﻿<UserControl x:Class="CPPEI.Coolzon.Designer.Shell.CaptionButtons"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:CPPEI.Coolzon.Designer.Shell"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300" Name="uc">
    <UserControl.Resources>
        <Style x:Key="btnCloseStyle" TargetType="{x:Type Button}">
            <Setter Property="Width" Value="47"/>
            <Setter Property="Height" Value="19"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Button}">
                        <StackPanel Orientation="Horizontal" >
                            <Image Name="btnCloseImg" Source="./Images/X.png" />
                        </StackPanel>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver" Value="True">
                                <Setter Property="Source" TargetName="btnCloseImg" Value="./Images/X2.png"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="btnMaxStyle" TargetType="{x:Type Button}">
            <Setter Property="Width" Value="29"/>
            <Setter Property="Height" Value="19"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Button}">
                        <StackPanel Orientation="Horizontal" >
                            <Image Name="btnMaxImg" Source="./Images/O.png" />
                        </StackPanel>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver" Value="True">
                                <Setter Property="Source" TargetName="btnMaxImg" Value="./Images/O2.png"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="btnRestoreStyle" TargetType="{x:Type Button}">
            <Setter Property="Width" Value="29"/>
            <Setter Property="Height" Value="19"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Button}">
                        <StackPanel Orientation="Horizontal" >
                            <Image Name="btnRestoreImg" Source="./Images/Oo.png" />
                        </StackPanel>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver" Value="True">
                                <Setter Property="Source" TargetName="btnRestoreImg" Value="./Images/Oo2.png"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="btnMinStyle" TargetType="{x:Type Button}">
            <Setter Property="Width" Value="29"/>
            <Setter Property="Height" Value="19"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Button}">
                        <StackPanel Orientation="Horizontal" >
                            <Image Name="btnMinImg" Source="./Images/-.png" />
                        </StackPanel>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver" Value="True">
                                <Setter Property="Source" TargetName="btnMinImg" Value="./Images/-2.png"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </UserControl.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <StackPanel Grid.Column="1" Orientation="Horizontal" VerticalAlignment="Top" FlowDirection="RightToLeft">
            <Button x:Name="_ctlClose" Click="_ctlClose_Click" Style="{StaticResource btnCloseStyle}"/>
            <Button x:Name="_ctlMax" Click="_ctlMax_Click" Style="{StaticResource btnMaxStyle}"/>
            <Button x:Name="_ctlMin" Click="_ctlMin_Click" Style="{StaticResource btnMinStyle}"/>
        </StackPanel>
    </Grid>
</UserControl>
